<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/css/1625.5e74537e.chunk.css">
    <link rel="stylesheet" href="/css/1875.e7869e27.chunk.css">
    <link rel="stylesheet" href="/css/2828.b54ede6f.chunk.css">
    <link rel="stylesheet" href="/css/3409.87017755.chunk.css">
    <link rel="stylesheet" href="/css/4881.78d38e08.chunk.css">
    <link rel="stylesheet" href="/css/5892.148c7396.chunk.css">
    <link rel="stylesheet" href="/css/7182.78c3e594.chunk.css">
    <link rel="stylesheet" href="/css/9582.bc863a3d.chunk.css">


    <link rel="stylesheet" href="/css/layout__index.2d03cb4d.chunk.css">
    <link rel="stylesheet" href="/css/HeaderRight.c8616cce.chunk.css">
    <link rel="stylesheet" href="/css/p__NewInfoManage__index.d7c8a480.chunk.css">
    <link rel="stylesheet" href="/css/PageAlert.8c7e7f3e.chunk.css">
    <link rel="stylesheet" href="/css/umi.717090dc.css">


    <link rel="stylesheet" src="/publict__plugin-layout__Layout.49cdc665.chunk.css">

</head>
<body>

<div>
    <div class="ant-card easy-ui-card in___AP3Me" style="margin: 20px">
        <div class="ant-card-head">
            <div class="ant-card-head-wrapper">
                <div class="ant-card-head-title">
                    <div class="easy-ui-card-tip">
                        <div class="easy-ui-card-tip-title">用户基本信息</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="ant-card-body">
            <div class="line___D2gQF">
                <div class="ant-row" style="margin-left: -12px; margin-right: -12px; row-gap: 16px;">
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">真实姓名</span>
                        <span id="name" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">支付宝昵称</span>
                        <span id="alipayName" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">手机号码</span>
                        <span id="mobile" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">芝麻信用分</span>
                        <span id="zhiMaScore" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">性别</span>
                        <span id="gender" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">年龄</span>
                        <span id="age" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">邀请人</span>
                        <span id="inviteUser_name" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">注册渠道</span>
                        <span id="channel_name" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">备注</span>
                        <span id="remark" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">注册时间</span>
                        <span id="createTime" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">下单定位</span>
                        <span id="orderLocation" class="item___h4O2y">--</span>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <div class="ant-card easy-ui-card in___AP3Me" style="margin: 20px">
        <div class="ant-card-head">
            <div class="ant-card-head-wrapper">
                <div class="ant-card-head-title">
                    <div class="easy-ui-card-tip">
                        <div class="easy-ui-card-tip-title">实名信息</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="ant-card-body">
            <div class="line___D2gQF">
                <div class="ant-row" style="margin-left: -12px; margin-right: -12px; row-gap: 16px;">
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">姓名</span>
                        <span id="idCardName" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">身份证号码</span>
                        <span id="idCardNumber" class="item___h4O2y">--</span>
                    </div>

                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">性别</span>
                        <span id="ocrSex" class="item___h4O2y">--</span>
                    </div>

                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">居住地状况</span>
                        <span id="resiStatus" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">居住地邮编</span>
                        <span id="resiPc" class="item___h4O2y">--</span>
                    </div>

                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">民族</span>
                        <span id="ocrNation" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">发证机关</span>
                        <span id="ocrIssueOrg" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">身份有效期开始</span>
                        <span id="ocrStartValidDate" class="item___h4O2y">--</span>
                    </div>
                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">身份有效期截至</span>
                        <span id="ocrEndValidDate" class="item___h4O2y">--</span>
                    </div>


                    <div class="ant-col" style="padding-left: 12px; padding-right: 2px;width: 900px">
                        <span class="itemfirst___tV05S">身份证地址</span>
                        <span id="ocrAddress">--</span>
                    </div>

                    <div class="ant-col" style="padding-left: 12px; padding-right: 12px;width: 900px">
                        <span class="itemfirst___tV05S">居住地址</span>
                        <span id="homeAddress">--</span>
                    </div>

                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">身份证正面照片</span>
                        <a id="idCardPicFront_a" target="_blank">
                            <img id="idCardPicFront" class="ant-image-img image___YGDd8"
                                 style="height: 120px; width: 120px">
                        </a>
                    </div>

                    <div class="ant-col ant-col-8" style="padding-left: 12px; padding-right: 12px;">
                        <span class="itemfirst___tV05S">身份证反面照片</span>
                        <a id="idCardPicBack_a" target="_blank">
                            <img id="idCardPicBack" class="ant-image-img image___YGDd8"
                                 style="height: 120px; width: 120px">
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <div class="ant-modal-footer ng-star-inserted">
        <button class="ant-btn ng-star-inserted ant-btn-default" onclick="cancel()">
            <span> 关闭 </span></button>
        <button class="ant-btn ng-star-inserted ant-btn-primary" onclick="postCredit()">
            <span> 提交征信 </span></button>
    </div>

</div>

<script src="/jquery-3.5.1.min.js"></script>
<script src="/app.js"></script>
<script src="/url.js"></script>
<script src='/js/alert.js'></script>
<script type="text/javascript">
    var url = requestUrl + "/erupt-api/user/detail";
    var ids = new URLSearchParams(location.href.split('?')[1]).get("ids")
    $.ajax({
        type: "POST",
        url: url,
        headers: {
            token: parent.getAppToken().token
        },
        data: {orderId: ids},
        datatype: "json",
        success: function (result) {
            console.log(result)
            if (result.code == 1) {
                appendDate(result.data);
            } else {
                alert(result.msg)
            }
        }
    });

    function appendDate(resData) {
        if (resData.creditByCareers && resData.creditByCareers.length > 0) {
            let creditByCareer = resData.creditByCareers[0]
            for (let itemKey in creditByCareer) {
                inputById(creditByCareer[itemKey], itemKey)
            }
        }

        if (resData.creditByContactInfos && resData.creditByContactInfos.length > 0) {
            let contractInfo = ''
            for (let i = 0; i < resData.creditByContactInfos.length; i++) {
                let item = resData.creditByContactInfos[i]
                contractInfo += '<tr data-row-key="360407293" className="ant-table-row ant-table-row-level-0" >' +
                    '<td class="ant-table-cell">' + item.contactName + '</td>' +
                    '<td class="ant-table-cell">' + item.contactPhone + '</td>' +
                    '<td class="ant-table-cell">' + getContactRelation(item.contactRelation) + '</td>' +
                    '</tr>'
            }
            inputById(contractInfo, 'contract_body')
        }


        if (resData.creditByEduInfos && resData.creditByEduInfos.length > 0) {
            let creditByEduInfo = resData.creditByEduInfos[0]
            for (let itemKey in creditByEduInfo) {
                inputById(creditByEduInfo[itemKey], itemKey)
            }
        }

        if (resData.creditByMariInfos && resData.creditByMariInfos.length > 0) {
            let creditByMariInfo = resData.creditByMariInfos[0]
            for (let itemKey in creditByMariInfo) {
                inputById(creditByMariInfo[itemKey], itemKey)
            }
        }


        if (resData.rentalUserIdentity && resData.rentalUserIdentity.length > 0) {
            let rentalUserIdentity = resData.rentalUserIdentity[0]
            for (let itemKey in rentalUserIdentity) {
                inputById(rentalUserIdentity[itemKey], itemKey)
            }
        }


        for (let key in resData) {
            inputById(resData[key], key)
        }

        if (resData.inviteUser) {
            inputById(resData.inviteUser.name, 'inviteUser_name')
        }

        if (resData.channel) {
            inputById(resData.channel.name, 'channel_name')
        }
    }


    function getContactRelation(data) {
        if (data == 1) return '父母'
        if (data == 2) return '子女'
        if (data == 3) return '兄弟姐妹'
        if (data == 4) return '朋友'
        if (data == 5) return '配偶'
        if (data == 6) return '亲戚'
        if (data == 7) return '同学'
        if (data == 8) return '同事'
        if (data == 9) return '其他'
    }

    function inputById(data, idName) {
        if (document.getElementById(idName)) {
            document.getElementById(idName).innerHTML = data


            if (idName == 'gender') {
                if (data == 'M') {
                    document.getElementById(idName).innerHTML = '男'
                } else if (data == 'F') {
                    document.getElementById(idName).innerHTML = '女'
                }
            }

            if (idName == 'idCardPicFront' || idName == 'idCardPicBack') {
                let fileUrl = data
                if (!data.startsWith('http')) {
                    fileUrl = window.eruptSiteConfig.fileDomain + data
                }
                document.getElementById(idName).setAttribute("src", fileUrl)
                document.getElementById(idName + '_a').href = fileUrl
            }


            if (idName == 'empStatus') {
                if (data == 11) document.getElementById(idName).innerHTML = '国家公务员'
                if (data == 13) document.getElementById(idName).innerHTML = '专业技术人员'
                if (data == 17) document.getElementById(idName).innerHTML = '职员'
                if (data == 21) document.getElementById(idName).innerHTML = '企业管理人员'
                if (data == 24) document.getElementById(idName).innerHTML = '工人'
                if (data == 27) document.getElementById(idName).innerHTML = '农民'
                if (data == 31) document.getElementById(idName).innerHTML = '学生'
                if (data == 37) document.getElementById(idName).innerHTML = '现役军人'
                if (data == 51) document.getElementById(idName).innerHTML = '自由职业者'
                if (data == 54) document.getElementById(idName).innerHTML = '个体经营者'
                if (data == 70) document.getElementById(idName).innerHTML = '无业人员'
                if (data == 80) document.getElementById(idName).innerHTML = '退（离）休人员'
                if (data == 90) document.getElementById(idName).innerHTML = '其他'
                if (data == 99) document.getElementById(idName).innerHTML = '未知'
            }

            if (idName == 'cpnType') {
                if (data == 10) document.getElementById(idName).innerHTML = '机关-事业单位'
                if (data == 20) document.getElementById(idName).innerHTML = '国有企业'
                if (data == 30) document.getElementById(idName).innerHTML = '外资企业'
                if (data == 40) document.getElementById(idName).innerHTML = '个体-私营企业'
                if (data == 50) document.getElementById(idName).innerHTML = '其他'
                if (data == 99) document.getElementById(idName).innerHTML = '未知'
            }

            if (idName == 'industry') {
                if (data == 'A') document.getElementById(idName).innerHTML = '农、林、牧、渔业'
                if (data == 'B') document.getElementById(idName).innerHTML = '采矿业'
                if (data == 'C') document.getElementById(idName).innerHTML = '制造业'
                if (data == 'D') document.getElementById(idName).innerHTML = '电、热力、燃气及水生产和供应业'
                if (data == 'E') document.getElementById(idName).innerHTML = '建筑业'
                if (data == 'F') document.getElementById(idName).innerHTML = '批发和零售业'
                if (data == 'G') document.getElementById(idName).innerHTML = '交通运输、仓储和邮储业'
                if (data == 'H') document.getElementById(idName).innerHTML = '住宿和餐饮业'
                if (data == 'I') document.getElementById(idName).innerHTML = '信息传输、技术和软件技术服务'
                if (data == 'J') document.getElementById(idName).innerHTML = '金融业'
                if (data == 'K') document.getElementById(idName).innerHTML = '房地产业'
                if (data == 'L') document.getElementById(idName).innerHTML = '租赁和商务服务业'
                if (data == 'M') document.getElementById(idName).innerHTML = '科学研究和技术服务业'
                if (data == 'N') document.getElementById(idName).innerHTML = '水利、环境和公共设施管理业'
                if (data == 'O') document.getElementById(idName).innerHTML = '居民服务、修理和其他服务业'
                if (data == 'P') document.getElementById(idName).innerHTML = '教育'
                if (data == 'Q') document.getElementById(idName).innerHTML = '卫生和社会工作'
                if (data == 'R') document.getElementById(idName).innerHTML = '文化、体育和娱乐业'
                if (data == 'S') document.getElementById(idName).innerHTML = '公共、社会保障和社会组织'
                if (data == 'T') document.getElementById(idName).innerHTML = '国际组织'
                if (data == '9') document.getElementById(idName).innerHTML = '未知'
            }

            if (idName == 'occupation') {
                if (data == '0') document.getElementById(idName).innerHTML = '国家机关、党群组织、企业、事业单位负责人'
                if (data == '1') document.getElementById(idName).innerHTML = '专业技术人员'
                if (data == '3') document.getElementById(idName).innerHTML = '办事人员和有关人员'
                if (data == '4') document.getElementById(idName).innerHTML = '商业、服务业人员'
                if (data == '5') document.getElementById(idName).innerHTML = '农、林、牧、渔、水利业生产人员'
                if (data == '6') document.getElementById(idName).innerHTML = '生产、运输设备操作人员及有关人员'
                if (data == 'X') document.getElementById(idName).innerHTML = '军人'
                if (data == 'Y') document.getElementById(idName).innerHTML = '不便分类的其他从业人员'
                if (data == 'Z') document.getElementById(idName).innerHTML = '未知'
            }

            if (idName == 'title') {
                if (data == 1) document.getElementById(idName).innerHTML = '高级领导'
                if (data == 2) document.getElementById(idName).innerHTML = '中级领导'
                if (data == 3) document.getElementById(idName).innerHTML = '一般员工'
                if (data == 9) document.getElementById(idName).innerHTML = '未知'
            }


            if (idName == 'techTitle') {
                if (data == 1) document.getElementById(idName).innerHTML = '高级'
                if (data == 2) document.getElementById(idName).innerHTML = '中级'
                if (data == 3) document.getElementById(idName).innerHTML = '初级'
                if (data == 0) document.getElementById(idName).innerHTML = '无'
                if (data == 9) document.getElementById(idName).innerHTML = '未知'
            }

            if (idName == 'eduLevel') {
                if (data == '10') document.getElementById(idName).innerHTML = '研究生'
                if (data == '20') document.getElementById(idName).innerHTML = '本科'
                if (data == '30') document.getElementById(idName).innerHTML = '大专'
                if (data == '40') document.getElementById(idName).innerHTML = '中专、职高、技校'
                if (data == '60') document.getElementById(idName).innerHTML = '高中'
                if (data == '91') document.getElementById(idName).innerHTML = '初中及以下'
                if (data == '99') document.getElementById(idName).innerHTML = '未知'
            }


            if (idName == 'acaDegree') {
                if (data == 1) document.getElementById(idName).innerHTML = '名誉博士'
                if (data == 2) document.getElementById(idName).innerHTML = '博士'
                if (data == 3) document.getElementById(idName).innerHTML = '硕士'
                if (data == 4) document.getElementById(idName).innerHTML = '学士'
                if (data == 5) document.getElementById(idName).innerHTML = '无'
                if (data == 9) document.getElementById(idName).innerHTML = '未知'
            }

            if (idName == 'marriStatus') {
                if (data == 10) document.getElementById(idName).innerHTML = '未婚'
                if (data == 20) document.getElementById(idName).innerHTML = '已婚'
                if (data == 30) document.getElementById(idName).innerHTML = '丧偶'
                if (data == 40) document.getElementById(idName).innerHTML = '离婚'
                if (data == 99) document.getElementById(idName).innerHTML = '未知'
            }

            if (idName == 'ocrSex') {
                if (data == 1) document.getElementById(idName).innerHTML = '男'
                if (data == 2) document.getElementById(idName).innerHTML = '女'
            }
            if (idName == 'resiStatus') {
                if (data == 1) document.getElementById(idName).innerHTML = '自置'
                if (data == 2) document.getElementById(idName).innerHTML = '按揭'
                if (data == 3) document.getElementById(idName).innerHTML = '亲属楼宇'
                if (data == 4) document.getElementById(idName).innerHTML = '集体宿舍'
                if (data == 5) document.getElementById(idName).innerHTML = '租房'
                if (data == 6) document.getElementById(idName).innerHTML = '共有住宅'
                if (data == 12) document.getElementById(idName).innerHTML = '借住'
                if (data == 9) document.getElementById(idName).innerHTML = '未知'
            }

        }
    }

    function cancel() {
        parent.document.querySelector(".ant-modal-close-x").click()
    }

    function postCredit() {
        let name = document.getElementById('name').innerText
        let idCardNumber = document.getElementById('idCardNumber').innerText
        $.alerts._show('征信提交', '是否将客户【' + name + '-' + idCardNumber + '】提交到人行征信', '', 'confirm', function () {

        })
    }

</script>

</body>
</html>